﻿using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace Wisdom.Core
{
    public class WebBuildManager : BuildManager
    {
        public override IEnumerable<Assembly> Assemblies
        {
            get
            {
                return referencedAssemblies ??
                       (referencedAssemblies =
                       System.Web.Compilation.BuildManager.GetReferencedAssemblies()
                              .Cast<Assembly>()
                              .Where(assembly => !assembly.GlobalAssemblyCache)
                              .ToList());
            }
        }
    }
}